<html>
	<head>
		<meta http-equiv="content-type" content="text/html; charset=utf-8">
        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
		<script type="text/javascript" src="./Geolocation.js"></script>
		<title>定位测试</title>
		<style>
			*{padding:0px;margin:0px;text-decoration:none;}
		</style>
	</head>
	<body>

    <!-- 获取坐标位置 -->
    <div class="position"></div>




    <div id="mapholder"></div>


    <!-- 获取坐标位置 -->
    <div class="flow"></div>

<script>
getLocation(function(p){
    var x = "Latitude: " + p.coords.latitude + 
  "<br />Longitude: " + p.coords.longitude;
    $('.position').html(x);
});


getLocationError(function(position){
    var latlon=position.coords.latitude+","+position.coords.longitude;
    var img_url="http://maps.googleapis.com/maps/api/staticmap?center=" + 
    latlon+"&zoom=14&size=400x300&sensor=false";
    document.getElementById("mapholder").innerHTML="<img src='"+img_url+"' />";
});



getLocationFllow(function(p){
    var t = new Date();
    var x = t+"<br />Latitude: " + p.coords.latitude + 
  "<br />Longitude: " + p.coords.longitude;
    $('.flow').html(x);
});

</script>
	</body>
</html>

